<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  
<div id="app">

  <!-- 1. select单选框 -->
  <select name="abc" v-model="fruit">
    <option value="苹果">苹果</option>
    <option value="香蕉">香蕉</option>
    <option value="香梨">香梨</option>
    <option value="榴莲">榴莲</option>
  </select>
  
  <h2>你选择的水果是 {{fruit}}</h2>

  <!-- 2. select多选框 -->
  <select v-model="fruits" multiple>
    <option value="苹果">苹果</option>
    <option value="香蕉">香蕉</option>
    <option value="香梨">香梨</option>
    <option value="榴莲">榴莲</option>
  </select>

  <h2>你选择的水果是 {{fruits}}</h2>

  <label v-for="item in originFruits" :for="item">
    <input type="checkbox" :value="item" :id="item" v-model="fruits">{{item}}
  </label>

</div>

<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data:
    {
      message: 'Hello World',

      originFruits: ['苹果', '香蕉', '榴莲', '荔枝', '西瓜'],

      fruit: '苹果',
      fruits: [],
    },
    methods: 
    {
      
    }
  })  
</script>

</body>
</html>